<template>
	<u-overlay :show="modalShow">
		<view class="bg-white modal-cont">
			<view class="flex padding">
				<view class="flex align-center">
					<image class="poster margin-right" src="" mode=""></image>
				</view>
				<view class="flex justify-between info list">
					<view class="">
						蛋糕名称
						<view class="margin-tb-xs">FrenchName</view>
						￥199
					</view>
				</view>
			</view>
			<view class="flex justify-between padding u-border-top">
				<view class="">
					规格选择
				</view>
			</view>
			<view class="flex justify-between padding u-border-top align-center">
				<view class="">
					数量选择
				</view>
				<u-number-box v-model="value" buttonSize="20"></u-number-box>
			</view>
			<view class="flex btn-cont text-center">
				<view class="padding bg-yellow">
					取消
				</view>
				<view class="padding bg-brown" @click="handleModalShow">
					确定
				</view>
			</view>
		</view>
	</u-overlay>
</template>

<script>
	import {mapState} from 'vuex'
	export default {
		name:"cart-modal",
		data() {
			return {
				value:1
			};
		},
		computed: {
			...mapState({
				modalShow:state=>state.cart.modalShow
			})
		},
		methods: {
			handleModalShow() {
				this.$store.commit('cart/modalMut',false)
			}
		},
	}
</script>

<style lang="scss">
.poster{
	width: 180upx;
	height: 180upx;
	background-color: #d8d8d8;
}
.info{
	&.list{
		width: 60%;
	}
	.edit{
		width: 80upx;
		height: 80upx;
		text-align: center;
		line-height: 80upx;
		background-color: #e6e6e6;
		border-radius: 50%;
		
	}
}
.modal-cont{
	position: absolute;
	top: 50%;
	left: 5%;
	width: 90%;
	transform: translateY(-50%);
}
.btn-cont view{
	width: 50%;
}
</style>